package com.nbufe.exception;


import com.nbufe.enums.AppHttpCodeEnum;

public class SystemException extends RuntimeException {

    private int code;

    private String msg;

    public SystemException(String msg) {
        super(msg);
        this.code = 500;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public SystemException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }

}
